
#include "Definitions.h"

namespace Math
{
  UINT64 PowerOf2In(UINT64 max, UINT64 min) 
  { 
    UINT64 Result = 0;
    while(min<=max) 
    { 
      Result++;
      min = min << 1;
    }
    return Result;
  }

}

std::wstring StringToWString(const std::string& s)
{
  std::wstring temp(s.length(),L' ');
  std::copy(s.begin(), s.end(), temp.begin());
  return temp; 
};

std::string WStringToString(const std::wstring& s)
{
  std::string temp(s.length(), ' ');
  std::copy(s.begin(), s.end(), temp.begin());
  return temp; 
};

std::wstring to_wstring(unsigned long val)
{
  std::wstring mystr;
  wchar_t buf[8];
  _itow(val,buf,10);
  mystr.append(buf);
  return mystr;
};